//
// Created by xili on 2024/8/22 13:27.
// GO BIG OR GO HOME.
//
#include "leetcode.h"

class Solution {
public:
    int findValueOfPartition(vector<int> &nums) {
        sort(nums.begin(), nums.end());
        int n = nums.size();
        int ans = INT32_MAX;
        for (int i = 1; i < n; i++) {
            ans = min(ans, nums[i] - nums[i - 1]);
        }
        return ans;
    }
};